{include file="head" /}

{include file="menu" /}


<!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <!--state overview start-->
              
              <div class="row state-overview">
                <div class="container">
                <div class="row">
                      <form action="{:url('pricelist')}" method="get">
                      <div class="col-lg-3 mar-10">
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon1">用户名称</span>
                            <input type="text" value="{$getdata.username?$getdata.username:''}" placeholder="昵称/姓名/手机号/编号" class="form-control" name="username" />
                        </div>
                      </div>

                      <div class="col-lg-6 mar-10">
                        <div class="input-group">
                            <span class="input-group-addon" id="basic-addon1">结算时间</span>
                            <input type="text"  id="datetimepicker" class="form-control" placeholder="点击选择时间" name="starttime" value="{$getdata.starttime?$getdata.starttime:''}"/>
                            <span class="input-group-addon" id="basic-addon1">至</span>
                            <input type="text"  id="datetimepicker_end" class="form-control" placeholder="点击选择时间" name="endtime" value="{$getdata.endtime?$getdata.endtime:''}" />
                        </div>
                      </div>

                    <div class="mar-10 col-lg-3">
                   <input type="submit" class="btn btn-success" value="搜索">
                  </div>

                      
                  </div>
                  

                  </form>
                </div>
                
              </div>
              <br><br><br>
            <div class="row state-overview">
                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol red color_white">
                              <h5>入金总额</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="all_res"></h1>
                          </div>
                      </section>
                  </div>
                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol gray color_white">
                              <h5>出金总额</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="all_cash"></h1>
                          </div>
                      </section>
                  </div>
                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol blue color_white">
                              <h5>佣金总额</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="all_yj"></h1>
                          </div>
                      </section>
                  </div>

                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol red color_white">
                              <h5>红利总额</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="all_hl"></h1>
                          </div>
                      </section>
                  </div>

                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol terques color_white">
                              <h5>当日盈亏</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="tody_ploss"></h1>
                          </div>
                      </section>
                  </div>

                  <div class="col-lg-2 col-sm-2">
                      <section class="panel">
                          <div class="symbol blue color_white">
                              <h5>历史盈亏</h5>
                          </div>
                          <div class="order-boo">
                              <h1 id="all_lis"></h1>
                          </div>
                      </section>
                  </div>
                  
                  

              </div>
                      </div>

            <a href="{:url('price/pricelist')}"><button type="submit" class="btn btn-danger">搜索全部</button></a>&nbsp;&nbsp;&nbsp;&nbsp;
            
            <br><br>
             <div class="row">
                  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              资金报表
                          </header>
                          <table class="table table-striped table-advance table-hover">
                            <thead class="ordertable">
                              <tr>
                                <th>用户</th>
                                <th>代理商</th>
                                <th>入金总额</th>
                                <th>入金次数</th>
                                <th>出金总额</th>
                                <th>出金次数</th>
                                <th>佣金</th>
                                <th>红利</th>
                                <th>余额</th>
                                <th>净入金</th>
                                <th>当日盈亏</th>
                            </tr>
                          </thead>
                          <tbody>
                          <!-- {volist name="_list" id="vo"} -->
                              <tr>
                                  
                                 <td>{$vo.username}</td>
                                 <td>{$vo.managername?$vo.managername:'admin'}</td>
                                 <td>{$vo.all_res?$vo.all_res:'0'}</td>
                                 <td>{$vo.all_res_count}</td>
                                 <td>{$vo.all_cash?$vo.all_cash:'0'}</td>
                                 <td>{$vo.all_cash_count}</td>
                                 <td>{$vo.all_yj?$vo.all_yj:'0'}</td>
                                 <td>{$vo.all_hl?$vo.all_hl:'0'}</td>
                                 <td>{$vo.usermoney?$vo.usermoney:'0'}</td>
                                 <td>{$vo.res_cash?$vo.res_cash:'0'}</td>
                                 <td>{$vo.tody_ploss?$vo.tody_ploss:'0'}</td>
                                  
                                  
                              </tr>
							           <!-- {/volist} -->
                             
                              </tbody>
                          </table>
                      </section>
                  
              
                      {$list->render()}
                </div>
              </div>


          </section>


      </section>
      <!--main content end-->
  </section>

{include file="foot" /}

<script>  
pricesta();
function pricesta(){
  var formurl = "{:url('/admin/price/pricesta')}";
  var data  = '{$jsongetdata}';
  
console.log(data);
  
  $.post(formurl,data,function(data){

      var obj = JSON.parse(data);
      $.each(obj,function(k,v){
        if(!v){
          v=0;
        }
        $('#'+k).html(v);
      })
      


    });
    
}

//时间选择器
$('#datetimepicker').datetimepicker();
$('#datetimepicker_end').datetimepicker();


</script>